

import 'package:get/get.dart';


//加载转状态
enum ViewState {
  error, //加载错误
  normal, //正常加载
  loading, //loading的状态
  empty, //无数据的状态
}


class MyBaseController extends SuperController {

  Rx<ViewState> viewState = ViewState.normal.obs;

  void updateViewState(ViewState newValue) {  
    viewState.value = newValue; // 更新枚举值  
  }  

  @override
  void onReady() {
   
  }

  @override
  void onDetached() {
   
  }

  @override
  void onHidden() {
   
  }

  @override
  void onInactive() { 
  }

  @override
  void onPaused() {
    
  }

  @override
  void onResumed() {
    
  }
  
}
